﻿using Com.OpenCode.Framework.Core;
using DevExpress.XtraBars.Ribbon;

namespace Com.OpenCode.Framework.DevForm
{
    public class StatusBarUI : RibbonStatusBar, IStatusSetValue
    {
        public StatusBarUI(BuildItemEventArgs args)
        {
            MainForm _AddInForm = args.Owner as MainForm;
            args.Plugin.Owner = this;
            _AddInForm.Ribbon.StatusBar = this;
            Ribbon = _AddInForm.Ribbon;
            _AddInForm.Controls.Add(this);
        }

        #region IStatusSetValue 成员

        public int InformationIndex
        {
            get { return -1; }
        }

        public void SetStatusValue(object value)
        {
        }

        public void SetStatusVisible(bool visible)
        {
            Visible = visible;
        }

        #endregion
    }
}